home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: scn.org!bd592
- From: bd592@scn.org (Corey E. Tabaka)
- Subject: Re: Printing to LPT1 Printer from within program
- Message-ID: <DLrL6n.4J2@scn.org>
- Sender: news@scn.org
- Reply-To: bd592@scn.org (Corey E. Tabaka)
- Organization: Seattle Community Network
- References: <31076D63.289D@cmt.lpr.mail.carel.fi> <4e5ee9$m28_001@pr.mcs.net>
- Date: Fri, 26 Jan 1996 01:23:11 GMT
-
-
- In a previous article, aril@cmt.lpr.mail.carel.fi (Ari Lukumies) says:
-
- >Michael D. Perry wrote:
- >>
- >> I have just started taking a C programming class and am using Borland
- >> C++ v4.0 at home. Both my teacher and I are stumped as to how to
- >> print to a LPT (Line Printer) device from within the program.
- >>
- >> I have read the FAQ and there are some references to this but not
- >> enough that I can quite figure it out. As near as I can figure you
- >> can use iostreams or fprintf() with the later appearing to be the
- >> simpler of the two. With that, from what I have seen, one uses a
- >> filename of stdprn but I get an error message when compiling. My
- >> guess is that there is a header file or a definition/declaration
- >> statement that needs to be referenced.
- >> [rest snipped]
- >
- >Have you tried:
- >
- > #include <stdio.h>
- >
- > int main(int argc, char **argv)
- > {
- > while (argc--)
- > fprintf(stderr, "%s\n", *argv++);
- > }
- >
- >Later,
- >AriL
- >--
- >All my opinions are mine and mine alone.
- >
-
- Or you could try...
-
-
- #include <stdio.h>
-
- int main() {
-
- FILE *lpt1;
- .
- .
- .
-
- ...lpt1=fopen("LPT1","w");
-
-
- --
-
- Corey Tabaka,
- bd592@scn.org
-
-
-